package com.opennice.action.demo;


import net.sf.json.JSONArray;

import com.opensymphony.xwork2.ActionSupport;
import com.yundian.user.service.impl.UserService;
import com.yundian.user.vo.User;

public class AjaxShowAction extends ActionSupport {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	String result;
	UserService userService; 
   public String showAjax() throws Exception{
	    System.out.println("baidu.com");
		User user=new User();
		user.setAge(Integer.valueOf(32));
		user.setPassword("220589");
		user.setUserid(Integer.valueOf(323));
		user.setUsername("chengjieliulxiang");
		userService.saveUser(user);
	    JSONArray jo=JSONArray.fromObject(user);
	    result=jo.toString();
		return SUCCESS;
	}
	public String getResult() {
		return result;
	}
	public void setResult(String result) {
		this.result = result;
	}
	public static long getSerialVersionUID() {
		return serialVersionUID;
	}
	public UserService getUserService() {
		return userService;
	}
	public void setUserService(UserService userService) {
		this.userService = userService;
	}
	
	
}
